<!doctype html>
<html>
	<head>
		<meta charset="UTF-8" />
		<meta name="apple-itunes-app" content="app-id=504274740" />
		<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">

	</head>
	<body>
		<a class="uri-link" href="#"
		data-uri-app="myapp://"
		data-url-app-not-found="http://www.google.com?q=not-found-link"
		> Example 1 </a> ​<a href="taobao://m.taobao.com" target="_self" id="taobao">连接到淘宝</a><a href="vstoreiphone://163.com" target="_self" id="trip">连接到miss</a><iframe frameborder="0" src="apptest.html" width="0" height="0"></iframe>
		<script src="jquery-1.10.1.min.js"></script>
		<script type="text/javascript">
			/*
			 //<a href="#" onclick="startIThrown()">Restart iThrown</a>
			 document.location = 'taobao://m.taobao.com';
			 function startIThrown(){
			 document.location = 'taobao://m.taobao.com';
			 setTimeout(function(){
			 document.location = 'http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=293049283&mt=8&uo=6';
			 }, 300);
			 }
			 */

			function applink() {
				return function() {
					var clickedAt = +new Date;
					setTimeout(function() {
						!window.document.webkitHidden && setTimeout(function() {
							if (+new Date - clickedAt < 2000) {
								window.location = 'http://163.com';
							}
						}, 500);
					}, 500)
				};
			}


			document.getElementById("taobao").onclick = applink();
			document.getElementById("trip").onclick = applink();

		</script>
	</body>
</html>